package de.wbh.gwt.form.layouter.shared.area;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.place.shared.Place;
import com.google.inject.Inject;

import de.wbh.gwt.form.layouter.shared.activity.ActivityFactory;
import de.wbh.gwt.form.layouter.shared.place.StartPlace;

public class Deck1ContentAreaActivityMapper implements ActivityMapper {

	private final ActivityFactory activityFactory;

	@Inject
	public Deck1ContentAreaActivityMapper(ActivityFactory activityFactory) {
		this.activityFactory = activityFactory;
	}

	@Override
	public Activity getActivity(Place place) {
		if (place instanceof StartPlace)
			return this.activityFactory.getStartActivity();
		return null;
	}

}
